#!/bin/sh
#
# Create Manual Page Package
#
# $ DIDF: pkgman.sh    Rev. 0.1.2    2014-04-18T01:26+08:00 $

PKG_MAN_PATH="../../man"

if test ! -d $PKG_MAN_PATH
then
  mkdir $PKG_MAN_PATH
fi

# Copy Manual Page
cp didview.1 $PKG_MAN_PATH/didview.1
cp diddraw.1 $PKG_MAN_PATH/diddraw.1

cp txtf2did.1 $PKG_MAN_PATH/txtf2did.1

cp did_head.3 $PKG_MAN_PATH/did_head_t.3
cp did_head.3 $PKG_MAN_PATH/did_head_set_info.3
cp did_head.3 $PKG_MAN_PATH/did_head_stdout.3

cp did_meta.3 $PKG_MAN_PATH/did_meta_t.3
cp did_meta.3 $PKG_MAN_PATH/did_meta_set_info.3
cp did_meta.3 $PKG_MAN_PATH/did_meta_stdout.3

cp did_body.3 $PKG_MAN_PATH/did_body_t.3
cp did_body.3 $PKG_MAN_PATH/did_body_create.3
cp did_body.3 $PKG_MAN_PATH/did_body_delete.3

cp did_read.3 $PKG_MAN_PATH/did_read_head.3
cp did_read.3 $PKG_MAN_PATH/did_read_meta.3

cp did_write.3 $PKG_MAN_PATH/did_write.3

# Compress Manual Page
gzip -f $PKG_MAN_PATH/didview.1
gzip -f $PKG_MAN_PATH/diddraw.1

gzip -f $PKG_MAN_PATH/txtf2did.1

gzip -f $PKG_MAN_PATH/did_head_t.3
gzip -f $PKG_MAN_PATH/did_head_set_info.3
gzip -f $PKG_MAN_PATH/did_head_stdout.3

gzip -f $PKG_MAN_PATH/did_meta_t.3
gzip -f $PKG_MAN_PATH/did_meta_set_info.3
gzip -f $PKG_MAN_PATH/did_meta_stdout.3

gzip -f $PKG_MAN_PATH/did_body_t.3
gzip -f $PKG_MAN_PATH/did_body_create.3
gzip -f $PKG_MAN_PATH/did_body_delete.3

gzip -f $PKG_MAN_PATH/did_read_head.3
gzip -f $PKG_MAN_PATH/did_read_meta.3

gzip -f $PKG_MAN_PATH/did_write.3
